import rclpy
from rclpy.node import Node
class MyParamNode(Node):
    def __init__(self):
        super().__init__('my_param_node_py')
        self.get_logger().info('MyParamNode创建')
        p1:rclpy.Parameter=rclpy.Parameter("car_name",value='bao')
        # type_=rclpy.Parameter.Type.INTEGER 这个是int64
        p2:rclpy.Parameter=rclpy.Parameter("width",value=1.5)
        p3:rclpy.Parameter=rclpy.Parameter("wheel",value=4)
        #
        self.get_logger().info('car_name=%s'%p1.value)
        self.get_logger().info('width=%s'%p2.value)
        self.get_logger().info('wheels=%s'%p3.value)
        self.get_logger().info('key=%s'%p1.name)


def main():
    rclpy.init()
    rclpy.spin(MyParamNode())
    rclpy.shutdown()


if __name__ == '__main__':
    main()